Skip to content

Conversation

@JoshuaLampert
Copy link
Member

@JoshuaLampert JoshuaLampert commented Jul 24, 2025

This way of showing the integration rules ensures that you can still copy-paste the result in the REPL and obtain the same object.
Closes #185.

@JoshuaLampert JoshuaLampert requested a review from mikeingold July 24, 2025 12:12
@codecov
Copy link

codecov bot commented Jul 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (e72b9db) to head (d5db351).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #189   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           19        19           
  Lines          190       198    +8     
=========================================
+ Hits           190       198    +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Contributor

Benchmark Results

main 70126ca... main / 70126ca...
Differentials/Differential 0.204 ± 0.001 μs 0.206 ± 0.002 μs 0.99 ± 0.011
Differentials/Jacobian 0.169 ± 0.001 μs 0.17 ± 0.0001 μs 0.995 ± 0.0059
Integrals/Segment/Scalar GaussKronrod 0.555 ± 0.0067 μs 0.56 ± 0.0077 μs 0.991 ± 0.018
Integrals/Segment/Scalar GaussLegendre 1.61 ± 0.008 μs 1.64 ± 0.009 μs 0.981 ± 0.0073
Integrals/Segment/Scalar HAdaptiveCubature 0.708 ± 0.016 μs 0.7 ± 0.015 μs 1.01 ± 0.031
Integrals/Segment/Vector GaussKronrod 2.8 ± 0.077 μs 2.75 ± 0.071 μs 1.02 ± 0.038
Integrals/Segment/Vector GaussLegendre 18 ± 0.64 μs 18.1 ± 0.54 μs 0.994 ± 0.046
Integrals/Segment/Vector HAdaptiveCubature 3.58 ± 0.12 μs 3.72 ± 0.11 μs 0.963 ± 0.042
Integrals/Sphere/Scalar GaussKronrod 0.069 ± 0.0018 ms 0.0691 ± 0.0012 ms 0.999 ± 0.031
Integrals/Sphere/Scalar GaussLegendre 1.87 ± 0.0048 ms 1.86 ± 0.0091 ms 1 ± 0.0055
Integrals/Sphere/Scalar HAdaptiveCubature 0.0479 ± 0.00013 ms 0.0476 ± 0.00011 ms 1.01 ± 0.0036
Integrals/Sphere/Vector GaussKronrod 0.104 ± 0.0015 ms 0.104 ± 0.0015 ms 1 ± 0.021
Integrals/Sphere/Vector GaussLegendre 3.43 ± 0.082 ms 3.39 ± 0.093 ms 1.01 ± 0.037
Integrals/Sphere/Vector HAdaptiveCubature 0.101 ± 0.0018 ms 0.101 ± 0.0017 ms 0.998 ± 0.025
Rules/GaussLegendre 22.1 ± 0.58 μs 21.9 ± 0.49 μs 1.01 ± 0.035
Specializations/Scalar GaussLegendre/BezierCurve 0.252 ± 0.007 ms 0.245 ± 0.007 ms 1.03 ± 0.041
Specializations/Scalar GaussLegendre/Line 7 ± 0.084 μs 6.96 ± 0.06 μs 1.01 ± 0.015
Specializations/Scalar GaussLegendre/Plane 0.745 ± 0.0019 ms 0.744 ± 0.0017 ms 1 ± 0.0034
Specializations/Scalar GaussLegendre/Ray 6.04 ± 0.052 μs 5.85 ± 0.045 μs 1.03 ± 0.012
Specializations/Scalar GaussLegendre/Rope 0.0504 ± 0.00039 ms 0.0512 ± 0.00034 ms 0.983 ± 0.01
Specializations/Scalar GaussLegendre/Tetrahedron 0.158 ± 0.0014 s 0.158 ± 0.001 s 0.999 ± 0.011
Specializations/Scalar GaussLegendre/Triangle 0.602 ± 0.0076 ms 0.712 ± 0.017 ms 0.846 ± 0.023
time_to_load 1.42 ± 0.0055 s 1.41 ± 0.011 s 1 ± 0.0088

Benchmark Plots

A plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR.
Go to "Actions"->"Benchmark a pull request"->[the most recent run]->"Artifacts" (at the bottom).

Copy link
Collaborator

@mikeingold mikeingold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Just had one formatting suggestion.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 24, 2025

Benchmark Results (Julia v1.10)

Time benchmarks
main d5db351... main / d5db351...
Differentials/Differential 0.205 ± 0.001 μs 0.211 ± 0.002 μs 0.972 ± 0.01
Differentials/Jacobian 0.17 ± 0.001 μs 0.17 ± 0.001 μs 1 ± 0.0083
Integrals/Segment/Scalar GaussKronrod 0.621 ± 0.01 μs 0.631 ± 0.011 μs 0.984 ± 0.023
Integrals/Segment/Scalar GaussLegendre 1.66 ± 0.03 μs 1.64 ± 0.01 μs 1.01 ± 0.019
Integrals/Segment/Scalar HAdaptiveCubature 0.831 ± 0.039 μs 0.862 ± 0.031 μs 0.964 ± 0.057
Integrals/Segment/Vector GaussKronrod 2.71 ± 0.28 μs 2.73 ± 0.33 μs 0.989 ± 0.16
Integrals/Segment/Vector GaussLegendre 17.6 ± 0.49 μs 18 ± 0.63 μs 0.973 ± 0.044
Integrals/Segment/Vector HAdaptiveCubature 3.7 ± 0.38 μs 3.7 ± 0.41 μs 1 ± 0.15
Integrals/Sphere/Scalar GaussKronrod 0.0704 ± 0.0007 ms 0.07 ± 0.00056 ms 1 ± 0.013
Integrals/Sphere/Scalar GaussLegendre 1.87 ± 0.0089 ms 1.87 ± 0.0046 ms 0.998 ± 0.0053
Integrals/Sphere/Scalar HAdaptiveCubature 0.0477 ± 0.00012 ms 0.0477 ± 0.0001 ms 1 ± 0.0033
Integrals/Sphere/Vector GaussKronrod 0.103 ± 0.0012 ms 0.103 ± 0.0012 ms 1.01 ± 0.017
Integrals/Sphere/Vector GaussLegendre 3.34 ± 0.099 ms 3.3 ± 0.096 ms 1.01 ± 0.042
Integrals/Sphere/Vector HAdaptiveCubature 0.0998 ± 0.0012 ms 0.099 ± 0.0013 ms 1.01 ± 0.018
Rules/GaussLegendre 22.3 ± 0.48 μs 22.3 ± 0.6 μs 0.997 ± 0.034
Specializations/Scalar GaussLegendre/BezierCurve 0.252 ± 0.0071 ms 0.252 ± 0.0071 ms 1 ± 0.04
Specializations/Scalar GaussLegendre/Line 6.93 ± 0.09 μs 7.05 ± 0.1 μs 0.983 ± 0.019
Specializations/Scalar GaussLegendre/Plane 0.745 ± 0.0022 ms 0.746 ± 0.0025 ms 0.999 ± 0.0045
Specializations/Scalar GaussLegendre/Ray 6.21 ± 0.059 μs 5.95 ± 0.051 μs 1.04 ± 0.013
Specializations/Scalar GaussLegendre/Rope 0.0515 ± 0.00024 ms 0.0513 ± 0.00027 ms 1.01 ± 0.0071
Specializations/Scalar GaussLegendre/Tetrahedron 0.157 ± 0.0011 s 0.159 ± 0.0013 s 0.985 ± 0.011
Specializations/Scalar GaussLegendre/Triangle 0.716 ± 0.013 ms 0.602 ± 0.0075 ms 1.19 ± 0.027
time_to_load 1.47 ± 0.041 s 1.5 ± 0.04 s 0.98 ± 0.038
Memory benchmarks
main d5db351... main / d5db351...
Differentials/Differential 3 allocs: 0.0938 kB 3 allocs: 0.0938 kB 1
Differentials/Jacobian 0 allocs: 0 B 0 allocs: 0 B
Integrals/Segment/Scalar GaussKronrod 2 allocs: 0.0469 kB 2 allocs: 0.0469 kB 1
Integrals/Segment/Scalar GaussLegendre 0 allocs: 0 B 0 allocs: 0 B
Integrals/Segment/Scalar HAdaptiveCubature 7 allocs: 0.492 kB 7 allocs: 0.492 kB 1
Integrals/Segment/Vector GaussKronrod 0.063 k allocs: 4.88 kB 0.063 k allocs: 4.88 kB 1
Integrals/Segment/Vector GaussLegendre 0.606 k allocs: 0.04 MB 0.606 k allocs: 0.04 MB 1
Integrals/Segment/Vector HAdaptiveCubature 0.085 k allocs: 6.75 kB 0.085 k allocs: 6.75 kB 1
Integrals/Sphere/Scalar GaussKronrod 0.198 k allocs: 5.19 kB 0.198 k allocs: 5.19 kB 1
Integrals/Sphere/Scalar GaussLegendre 0 allocs: 0 B 0 allocs: 0 B
Integrals/Sphere/Scalar HAdaptiveCubature 7 allocs: 0.648 kB 7 allocs: 0.648 kB 1
Integrals/Sphere/Vector GaussKronrod 1.11 k allocs: 0.0776 MB 1.11 k allocs: 0.0776 MB 1
Integrals/Sphere/Vector GaussLegendre 0.06 M allocs: 3.97 MB 0.06 M allocs: 3.97 MB 1
Integrals/Sphere/Vector HAdaptiveCubature 1.42 k allocs: 0.108 MB 1.42 k allocs: 0.108 MB 1
Rules/GaussLegendre 7 allocs: 0.0325 MB 7 allocs: 0.0325 MB 1
Specializations/Scalar GaussLegendre/BezierCurve 23 allocs: 0.75 kB 23 allocs: 0.75 kB 1
Specializations/Scalar GaussLegendre/Line 21 allocs: 0.938 kB 21 allocs: 0.938 kB 1
Specializations/Scalar GaussLegendre/Plane 22 allocs: 1.03 kB 22 allocs: 1.03 kB 1
Specializations/Scalar GaussLegendre/Ray 21 allocs: 0.938 kB 21 allocs: 0.938 kB 1
Specializations/Scalar GaussLegendre/Rope 0.068 k allocs: 1.62 kB 0.068 k allocs: 1.62 kB 1
Specializations/Scalar GaussLegendre/Tetrahedron 3 M allocs: 0.179 GB 3 M allocs: 0.179 GB 1
Specializations/Scalar GaussLegendre/Triangle 22 allocs: 1.03 kB 22 allocs: 1.03 kB 1
time_to_load 0.153 k allocs: 14.5 kB 0.153 k allocs: 14.5 kB 1

@mikeingold mikeingold added the enhancement New feature or request label Jul 24, 2025
@mikeingold
Copy link
Collaborator

I like the new benchmarks!

@mikeingold mikeingold merged commit d28d016 into main Jul 24, 2025
12 checks passed
@JoshuaLampert JoshuaLampert deleted the show-integration-rules branch July 24, 2025 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default print and show methods for custom types can be ugly

3 participants